#ifndef TDR_LIQUID_SENSOR_GLOBAL_HPP
#define TDR_LIQUID_SENSOR_GLOBAL_HPP

#include <Preferences.h>
#define SERIAL_OT_BUFFER_SIZE 254
#define SERIAL_IN_BUFFER_SIZE 254

#define MEASURMENT_1 0
#define MEASURMENT_2 1
#define MEASURMENT_3 2
#define MEASURMENT_4 3
#define CHANNEL1 0b000
#define CHANNEL2 0b001
#define CHANNEL3 0b010
#define CHANNEL4 0b011
#define NONE 0b111
//#define TMP_INPUT_0 36
//#define TMP_INPUT_1 39


/*
Normally, data transmit between wired and wireless
For either, source must be selected.
However, as a wireless-wired forwarder, only wired address would be selected, and vise cersa
We set it in bridgeDestine
*/

#define LIQUID "Domain_Liquid"
namespace Global {

	extern Preferences BoradData;
	// 0~100 as serial1 with multiplex
	// 100+ as forward to ESPNOW n-100
	// 0xff: none
	extern char outputBuffer[];
	extern char inputBuffer[];
	// threat serial0 virtually as another source, for debug 
	// destine would be either:
	//    a serial target, so the sender is the wireless sender[0]
	//    a wireless target, so the sender is the serial input (0 or 1)
	//    oxff so not forwarded

	extern char outputbuf[256];


	extern unsigned char flagReport;
	extern unsigned char flagFilledLiquid;

	extern unsigned int levelcycle;
	extern unsigned int cap_re;
	extern unsigned int cap_rl;
	extern unsigned int cap_lev;
	extern unsigned int cap_fl;
	extern float level;
	extern float Meas1;
	extern float Meas2;
	extern unsigned int minlev;
	extern unsigned int minrl;
};
struct capData {
	float level;
	unsigned int cap_rl;
	unsigned int cap_lev;

};


#endif